<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件修饰符</title>
</head>
<body>
    <div id="app" @click = 'clickDiv'>
        <button @click = 'clickBut'>点击</button>
    </div>
</body>
<script src="../js/vue.js"></script>
<script>
    let app = new Vue({
        el:'#app',
        data:{

        },
        methods:{
            clickDiv(){
                alert('点击了div')
            },
            clickBut(){
                alert('点击了but')
            }
        }
    })
</script>
</html>